<?php
$securities_param = get_param_value('securities_param', 'xray_securities_param', '');
if (!$securities_param) {
	$securities_param = $vars['sec'];
}
$_SESSION['xray_securities_param'] = $securities_param;
//print_r($securities_param);

$sec_code = $vars['sec'];
$sec_name = get_securities_name_by_code($sec_code);

$start_dt_ctrl = elgg_view('input/date', array(
	'name' => 'dr_start_dt',
	'value' => $dr_start_dt,
	'class' => 'stock-dt',
));
$end_dt_ctrl = elgg_view('input/date', array(
	'name' => 'dr_end_dt',
	'value' => $dr_end_dt,
	'class' => 'stock-dt',
));

$user_guid = elgg_get_logged_in_user_guid();
$follow_str = "follow";
if ($user_guid) {
	$follow = is_user_focused_ticker($user_guid, $sec_code);
	if ($follow) {
		$follow_str = "unfollow";
	}
}
?>
<div class='stock-sidebar'>
<h3 id='sec_name'><?php echo $sec_name; ?></h3>
<p id='sec_code'><?php echo $sec_code; ?></p>
<p><a href='javascript:void(0)' id='stock-follow'><?php echo $follow_str; ?></a></p>
<p>Start Date:<?php echo $start_dt_ctrl; ?></p>
<p>End Date:<?php echo $end_dt_ctrl; ?></p>
<p><a href='javascript:void(0)'>generate report</a></p>
</div>
